/**
 * Free software.
 */

package org.nanhill.xsheet.output;

import java.io.IOException;
import java.io.OutputStream;

import org.nanhill.commons.pattern.Factory;
import org.nanhill.xsheet.model.XSheetModel;

/**
 * @author alin [xalinx at gmail dot com]
 * @date 2006-12-1
 */
public interface OutputBuilder extends Factory<Object> {
	/**
	 * Set xsheet model.
	 * 
	 * @param model
	 */
	void setModel(XSheetModel model);

	/*
	 * Get produced sheet.
	 * 
	 * @return
	 */
	Object getProduct();

	/**
	 * Write produced sheet to output stream.
	 * 
	 * @param os
	 * @throws IOException
	 */
	void write(OutputStream os) throws IOException;
}
